﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using HaiHui.Business;

namespace HaiHui
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Albums_AlbumChanged(object sender, GenericEventArgs<HaiHui.Business.Album> e)
        {
            this.ctlPictures.Album = e.Data;
        }

        private void ctlPictures_SelectedPhotoChanged(object sender, GenericEventArgs<Picture> e)
        {
            this.ctlPictureDetail.Picture = e.Data;   
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ctlPictures.AddNewPhoto +=new EventHandler(ctlPictureDetail.AddNewPhoto);
        }
    }
}
